// consolemfc003.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "dlg.h"
#include "consolemfc003.h"



#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// The one and only application object

CWinApp theApp;

using namespace std;

int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
	int nRetCode = 0;
	char  *        retPassword;
	dlg myDlg;

	// initialize MFC and print and error on failure
	if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
	{
		// TODO: change error code to suit your needs
		_tprintf(_T("Fatal Error: MFC initialization failed\n"));
		nRetCode = 1;
	}
	else
	{

	//	myDlg.SetDlgItemTextW(IDC_EDIT1,"yjj is good");
		AfxInitRichEdit();
		
		CWnd* mHwnd;

		mHwnd = &myDlg;
		

	//	

int nResponse = myDlg.DoModal();
		//mHwnd->SetDlgItemTextW(IDC_EDIT1,_T("yjj is good"));

		//SetDlgItem(GetSafeHwnd(),IDC_EDIT1,_T("yjj is good"));

if (nResponse == IDOK)
{
//myDlg.SetDlgItemTextW(IDC_EDIT1,_T("yjj is good"));
	printf("hello\n");
//	GetDlgItemText(&myDlg,IDC_EDIT1,retPassword,128);

}
if (nResponse == IDCANCEL)
	{
}
		
		// TODO: code your application's behavior here.
	}

	return nRetCode;
}
